<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <style>
      body, html {
        margin: 0;
        padding: 0;
      }

    </style>

    <script>
       window.vars = {}
    </script>

    <script type="text/javascript">
      let clone = {
        methods: {
          $deepClone(source) {
            if (!source && typeof source !== 'object') {
              throw new Error('error arguments', 'shallowClone')
            }
            const targetObj = source.constructor === Array ? [] : {}
            Object.keys(source).forEach((keys) => {
              if (source[keys] && typeof source[keys] === 'object') {
                targetObj[keys] = source[keys].constructor === Array ? [] : {}
                targetObj[keys] = this.$deepClone(source[keys])
              } else {
                targetObj[keys] = source[keys]
              }
            })
            return targetObj
          }
        }
      }
      window.mixins = {
        clone
      }
    </script>

    <script>
      fnResize();
      window.onresize = function () {
        fnResize();
      }

      function fnResize() {
        var clientWidth= document.body.clientWidth;//屏幕宽度
        // if(clientWidth>1024){
        //   document.documentElement.style.fontSize = '85.3px';
        // }else{
            document.documentElement.style.fontSize = 100 / 750 * window.innerWidth + 'px';
        // }

      }
      // 禁止双击放大
      document.documentElement.addEventListener('touchstart', function (event) {
        if (event.touches.length > 1) {
          event.preventDefault();
        }
      }, false);
      var lastTouchEnd = 0;
      document.documentElement.addEventListener('touchend', function (event) {
        var now = Date.now();
        if (now - lastTouchEnd <= 300) {
          event.preventDefault();
        }
        lastTouchEnd = now;
      }, false);

    </script>

    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
